package map;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class Demo4 {
    public static void main(String[] args) {
        Map<String,String>map = new HashMap<>();
        map.put("1号老公","1号妻");
        map.put("2号老公","2号妻");
        map.put("3号老公","3号妻");
        map.put("4号老公","4号妻");
        map.put("5号老公","5号妻");
        Set<Map.Entry<String, String>> entries = map.entrySet();
        for (Map.Entry<String, String> entry : entries) {
            String key = entry.getKey();
            String value = entry.getValue();
            System.out.println(key+"----"+value);
        }
    }
}
